#ifndef _SOLAR_SYSTEM_H_
#define _SOLAR_SYSTEM_H_

#include "CWin.h"
#include "dkgl.h"
#include "Tank.h"

class Mouse : public DKGL::MouseVF
{
public:
	inline Mouse(DKGL::Camera *cam)
	{
		m_pExtCamera = cam;
	};

	virtual void leftDrag(int x, int y)
	{
		m_pExtCamera->rotate(-relX()*0.5, Vector3::UNIT_Y, LOCAL);
		m_pExtCamera->rotate(-relY()*0.5, Vector3::UNIT_X, LOCAL);
	}

	virtual void onlyMove(int x, int y)
	{
		
	};

private:
	DKGL::Camera *m_pExtCamera;
};

class SolarSystem : public CAIG::CWin
{
public:
	SolarSystem();
	bool init();

	virtual void OnCreate();
	virtual void OnPaint();
	virtual void OnSize(WORD width, WORD height);
	virtual void OnTime();
	virtual void KeyDown();

	void setMaterial();

private:

	void createScene();

	//DKGL::Light mSun;
	DKGL::Ball mEarth, mMoon;
	DKGL::Cube mEarthCube;
	DKGL::Camera *m_pCamera;
	Mouse *m_pMouse;
	bool mBeFixCam;

	Tank* tank;

};

#endif